<?
if(!$detailed_domain[($domain)][id]){
	include($remoteIncludeURL."whois.php?domain=$domain");
	echo "<a href='$_SERVER[HTTP_REFERER]'><input type=button value=Back></a>";
}else{
	if($domain_action=='whois'){
		$params[sid]=$sid;
		$params[action]= 'add_domain';
		$params[whois_changed] = 'yes';
		$return_url="$baseURL/$webDIR/?".encode_params($params);

		$explode_dom = explode('.',$domain);
		$url = $remoteIncludeURL.'registerdomain/index.php?';
		$data[action] = 'changedetails';
		$data[user_id] = 'reseller_domain';
		$data[sld] = $explode_dom[0];
		$data[tld] = $explode_dom[1];
		$data[return_url] = $return_url;
		if(is_array($data)){
		        while(list($k,$v) = each($data)){
		                if($v){
		                        if(is_array($v)){
			                        while(list($k1,$v1) =each($v)){
							if($v1) $options .= "&$k"."[".$k1."]=".urlencode($v1);
						}
					}else {
	                                	$options .= "&$k=".urlencode($v);
		                        }
	        	        }
		        }
		        $url = $url.$options;
		        $data = "";
		}
		echo "<br><b>$domain</b><br><br>";
		include_($url);
		echo "<br><br>";
	}elseif($domain_action=='dns'){

                $params[sid]=$sid;
                $params[action]= 'add_domain';
                $params[dns_changed] = 'yes';
                $return_url="$baseURL/$webDIR/?".encode_params($params);
		$explode_dom = explode('.',$domain);
		$url = $remoteIncludeURL.'registerdomain/index.php?';

		$data['action'] = 'changedns';
		$data['user_id'] = 'reseller_domain';
                $data['sld'] = $explode_dom[0];
                $data['tld'] = $explode_dom[1];
                $data['return_url'] = $return_url;

		if(is_array($data)){
			while(list($k,$v) = each($data)){
				if($v){
					if(is_array($v)){
						while(list($k1,$v1) =each($v)){
							 if($v1) $options .= "&$k"."[".$k1."]=".urlencode($v1);
						}
					}else {
						$options .= "&$k=".urlencode($v);
					}
				}
			}
			$url = $url.$options;
			$data = "";
		}
		include_($url);
		echo "<br><br>";		
	}
}
?>